<template>
  <view style="background-color: #f8f8f8;">
      <view >
        <view style="padding-top: 30upx;display: flex;justify-content: center; align-items: center;">
          <view style="font-weight: bold;padding-left: 50upx;">
            {{userInfo.areaName}}
          </view>

          <view style="width: 550upx;padding-left: 20upx;">
            <u-search placeholder="请输入理疗师名字" bgColor="#fff" v-model="name" :showAction="false"
              :search="searchHandle"></u-search>
          </view>
        </view>
      </view>
      <u-gap bg-color="#F8F8F8" height="20"></u-gap>
      <view style="display: flex;justify-content: center;">
        <view style="width: 95%;">
        <page :name="name" ref="page" />
        </view>
      </view>
  </view>
</template>

<script>
  import page from './index'
  export default {
    onLoad() {
      if (this.hasLogin) {
        this.$store.dispatch('ObtainUserInfo')
      }
    },
    computed: {
      userInfo() {
        return this.$store.getters.userInfo
      },
      hasLogin() {
        return this.$store.getters.hasLogin
      },
    },
    components: {
      page
    },
    data() {
      return {
        name: ''
      }
    },
    methods: {
      searchHandle(val) {
        this.$refs.page.getlist(val)
      }
    }
  }
</script>

<style>

</style>
